<?php
/**
 * 业务错误代码配置
 * Created by PhpStorm.
 * User: Keter
 * Date: 2016/8/9
 * Time: 17:59
 * ***************
 * 日志说明
 * 50000-69999
 * 5xxxx-6xxxx 业务错误
 * 8xxxx 程序错误
 * ***************
 */
class ErrorConfig
{
    public static $data = array(
        /*50xxx（不存在）*/
        'no_room'                 => array(50000, '房间不存在'),
        'no_server'               => array(50001, '服务器不存在'),
        'no_server_info'          => array(50002, '服务器信息不存在！'),
        'no_room_id'              => array(50003, '房间号不存在，请重新输入。'),
        'no_user'                 => array(50004, '用户不存在'),
        'no_socket_ext'           => array(50005, 'Socket扩展无法使用'),
        'no_socket_conn'          => array(50006, 'Socket缺少连接或连接失败'),
        'no_visit_num'            => array(50007, '回访码不存在'),
        'no_method'               => array(50008, '找不到方法${method}'),
        'no_server_config'        => array(50009, '缓存或数据库配置不存'),
        'no_paiju_id'             => array(50011, '牌局不存在或为空'),
        'no_user'                 => array(50012, '用户不存在'),
        'no_switch_name'          => array(50013, '开关名称不存在'),
        'no_switch_info'          => array(52018, '开关信息不存在'),
        'no_channel_info'         => array(52019, '渠道服务器信息不存在'),
        'no_user_server'          => array(52020, '您所在的服务器不存在'),
        'no_server_id'            => array(52021, '找不到可用服务器'),
        'no_paiju_detail'         => array(52022, '牌局详情不存在'),

        /*51xxx（不能为空）*/
        'empty_username'          => array(51000, '用户名不能为空'),
        'empty_pass'              => array(51001, '密码不能为空'),
        'empty_paiju'             => array(51002, '牌局不能为空'),
        'empty_visit_num'         => array(51003, '回访码不能为空'),

        /*52xxx（失败或错误）*/
        'failed_create_room'      => array(52000, '房间创建失败！'),
        'failed_apply_room'       => array(52001, '房间申请失败！'),
        'failed_grant_update'     => array(52002, '您的微信授权信息已失效，请重新登录！'),
        'failed_grand_get'        => array(52003, '授权获取失败'),
        'failed_info_get'         => array(52004, '信息获取失败'),
        'failed_redis_act'        => array(52005, 'Redis操作失败'),
        'error_redis_connect'     => array(52006, 'Redis连接出错'),
        'error_db_connect'        => array(52007, '数据库连接失败'),
        'failed_socket_read'      => array(52008, 'Socket读数据失败${socket_error}'),
        'failed_socket_send'      => array(52009, 'Socket请求发送数据失败'),
        'failed_socket_request'   => array(52010, 'Socket请求失败'),
        'failed_login'            => array(52011, '登录失败'),
        'failed_save_room'        => array(52012, '房间信息保存失败'),
        'failed_gen_visit_num'    => array(52013, '回访码生成失败'),
        'failed_save_visit_num'   => array(52014, '回访码保存失败'),
        'error_push_diamond_change' => array(52015, '用户钻石变动消息队列推入失败'),
        'failed_del_action'       => array(52016, '删除失败'),
        'failed_action'           => array(52017, '操作失败'),
        'failed_get_oss_token'    => array(52018, '验证授权失败'),

        /*53xxx（超过）*/
        'over_room_num'           => array(53000, '服务器房间数量已满！'),

        /*54xxx（错误或非法）*/
        'fault_uid'               => array(54000, 'UID错误'),
        'fault_pass'              => array(54001, '密码错误！'),
        'invalid_game_type'       => array(54002, '麻将类型不存在或非法'),
        'invalid_total_round'     => array(54003, '局数不存在或非法'),
        'invalid_request'         => array(54004, '非法请求'),
        'fault_token'             => array(54005, '用户身份非法'),

        /*55xxx（状态）*/
        'is_stopped_account'      => array(55000, '账号已停用！'),
        'is_closed_server'      => array(55001, '服务器已关闭！'),

        /*56xxx（异常）*/
        'exception_data'          => array(56000, '数据异常，请联系客服'),
        'exception_input'         => array(56001, '输入异常，请联系客服'),

        /*57xxx（不足）*/
        'no_enough_diamond'          => array(56000, '您目前的钻石数量不够${required}个，无法创建房间！'),
    );
}